package com.hualan.sfzyproject.mapper;

import com.hualan.sfzyproject.domain.PsyTrueReply;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
@Mapper
public interface PsyTrueReplyMapper {
    List<PsyTrueReply> selectByQuestionId(int questionId);

    List<PsyTrueReply> selectByUserId(int userId);


    int insert(@RequestParam("replyContent") String replyContent,
               @RequestParam("userId") Integer userId,
               @RequestParam("questionId") Integer questionId);

    int inserts(@RequestParam("replyContent") String replyContent,
                @RequestParam("userId") Integer userId,
                @RequestParam("questionId") Integer questionId,
                @RequestParam("fatherReplyId") Integer fatherReplyId);

    int deleteByReplyId(int replyId);

    int deleteByQuestionId(int questionId);

    List<PsyTrueReply> selectAll();


    List<PsyTrueReply> selectByLike(String like);
}
